package com.dd.cloud.user.entity.phar;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 药房信息表
 * </p>
 *
 * @author czg
 * @since 2020-03-21
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "药房表")
public class Pharmacy implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 药房表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 药房名字
     */
    @Column(length = 20, comment = "药房名字")
    private String name;

    /**
     * 省份
     */
    @Column(length = 20, comment = "省份")
    private String province;

    /**
     * 城市
     */
    @Column(length = 20, comment = "城市")
    private String city;

    /**
     * 区县
     */
    @Column(length = 20, comment = "区县")
    private String district;

    /**
     * 机构地址
     */
    @Column(length = 100, comment = "药房地址")
    private String addr;

    /**
     * 机构管理员-负责人邮箱
     */
    @Column(length = 50, comment = "负责人邮箱")
    private String adminEmail;

    /**
     * 机构管理员-负责人电话
     */
    @Column(length = 11, comment = "负责人电话")
    private String adminPhone;

    /**
     * 机构管理员-负责人名字
     */
    @Column(length = 20, comment = "负责人名字")
    private String adminName;

    /**
     * 备注
     */
    @Column(length = 100, comment = "备注")
    private String remark;

    /**
     * 订单状态 1支付成功 其他...
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "药房状态 1正常 2禁用 -1删除/注销")
    private Integer status;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;

    /**
     * 更新时间
     */
    @Column(comment = "更新时间")
    private LocalDateTime updateDate;

    /**
     * 操作人id
     */
    @Column(comment = "操作人id")
    private Integer operId;

    /**
     * 药房标识
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "药房类型 2自用药房 1公共药房")
    private Integer type;

    /**
     * 药房标识
     */
    @Column(type = MySqlTypeConstant.TINYINT, comment = "药房标识,数据标识")
    private Integer flag;

    /**
     * 是否要支付
     */
    @Column(type = MySqlTypeConstant.TINYINT, defaultValue = "1", comment = "是否需要支付 1需要 0不需要")
    private Integer isPay;

    /**
     * 是否地域限制
     */
    @Column(type = MySqlTypeConstant.TINYINT, defaultValue = "0", comment = "是否地域限制 1需要 0不需要")
    private Integer isRegionLimit;

    /**
     * 注销人
     */
    @Column(comment = "注销人")
    private String logoutName;

    /**
     * 注销时间
     */
    @Column(comment = "注销时间")
    private LocalDateTime logoutDate;

    /**
     * 药房门店id
     */
    @Column(comment = "药房门店id", length = 32)
    private String storeId;
}
